package javase1.day11.demo07;

public class DemoMain {
    public static void main(String[] args) {
        Hero hero=new Hero();
        hero.setName("后裔");

        //匿名对象加匿名内部类
        hero.setSkill(new Skill() {
            @Override
            public void method() {
                System.out.println("piupiupiupiu");
            }
        });
        hero.attack();
    }
}
